image: docker:24.0.6 
services: 
  - "docker:24.0.6-dind" 
 
 
stages: 
  - build 
  - upload 
  - deploy 
 
build: 
  stage: build 
  script: 
    - docker build -t kursovaya:$CI_COMMIT_SHORT_SHA . 
 
# upload-to-kind:
#   stage: upload
#   rules:
#     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH  # Запускает это задание, когда коммиты будут перенесены или объединены в ветку по умолчанию
#   script:
#     - kind load docker-image lab8app:${CI_COMMIT_SHORT_SHA}
 
# deploy: 
#   stage: deploy 
#   environment: 
#     name: production 
#   script: 
#     - kubectl get pods

upload:
  stage: upload
  script:
    - echo test

deploy:
  stage: deploy
  script:
    - echo test